<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<div class="table-responsive">
    <table class="table table-bordered">
        <thead>
        <tr class="jqgfirstrow" role="row">
            <th  class="text-center"><div class="table-first-id">ID</div></th>
            <th  class="text-center" width="20%">优惠券名称</th>
            <th  class="text-center" width="8%">类型</th>
            <th  class="text-center" width="10%">金额/折扣</th>
            <th  class="text-center" width="10%">数量</th>
            <th  class="text-center" width="8%">使用范围</th>
            <th  class="text-center" width="25%">有效期</th>

        </tr>
        </thead>
    </table>
    <div class="J_V_tabContent table-xScrollWrap">
        <table class="table table-bordered table-hover table-xs-content">
            <tbody id="tbodyCoupon">
            <tr class="jqgfirstrow" role="row">
                <th  class="text-center"><div class="table-first-id">&nbsp;</div></th>
                <th  class="text-center" width="20%">&nbsp;</th>
                <th  class="text-center" width="8%">&nbsp;</th>
                <th  class="text-center" width="10%">&nbsp;</th>
                <th  class="text-center" width="10%">&nbsp;</th>
                <th  class="text-center" width="8%">&nbsp;</th>
                <th  class="text-center" width="25%">&nbsp;</th>
            </tr>
            <tr th:if="${#lists.isEmpty(dataMap['list'])}">
                <td colspan="10" class="text-center">
                    <div class="noDataTipsBox">
                        <p><span class="c-4e fs16">亲，还没有数据~~~</span></p>
                    </div>
                </td>
            </tr>
            <tr th:if="!${#lists.isEmpty(dataMap['list'])}" th:each="coupon : ${dataMap['list']}" th:id="'tr_'+${coupon['id']}">
                <td class="text-center">
                    <input th:if="${coupon['status']}!=4" type="radio" class="i-checks " th:attr="data-name=${coupon['title']},data-num=${coupon['codeNum']}"  name="couponId" th:value="${coupon['id']}" th:text="${coupon['id']}">
                    <span th:if="${coupon['status']}==4" th:text="${coupon['id']}"></span>
                </td>
                <td class="text-center" th:attr="id='coupon-name-'+${coupon['id']}"  th:text="${coupon['title']}"></td>
                <td class="text-center">
                    <span th:if="${coupon['type']}==1">折扣券</span>
                    <span th:if="${coupon['type']}==2">定额券</span>
                </td>
                <td class="text-center" th:attr="id='coupon-price-'+${coupon['id']}" th:text="${coupon['limitAtion']}"></td>
                <td  class="text-center" th:text="${coupon['codeNum']}"></td>
                <td class="text-center"><span class="coupon-shop-data" th:attrprepend="data-id=${coupon['id']}"><a href="javascript:void(0)">查看范围</a></span></td>
                <td class="text-center">
                       <span class="pie"  th:text="${coupon['timeType']}==1 ? ${coupon['beginTime']}+'—'+${coupon['endTime']}:'永久'">
                        </span>
                </td>

            </tr>
            </tbody>
        </table>
    </div>
    <!-- 分页，开始 -->
    <div data-th-replace="layout/adminPage"></div>
    <!-- 分页，结束 -->
</div>
